/**
 * 
 */
package demo.vo;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;


/**
 * @author mandy.hu
 *
 */
public class XmlyLogSpan implements Serializable{

	private static final long serialVersionUID = -3853336658209523388L;
	
	private String app;
	private String hostName;
	private String ip;
	private String instance;
	private String level;
	private String processId;
	private String threadId;
	private String logIdentity;
	private String method;
	private String logDetail;
	private String eventType;

    private String serviceId;
	private String traceId;
	private String spanId;
	private Long timestamp;
	private boolean isSample;
	private String logId;
	private String file;
	private String monitorId;
	private String monitorPId;
    private String xmlyId;
    private Map<String, String> props; // optional
    private String c_sid;
    private String c_app;
    private String c_ip;
    private String logger;

    public XmlyLogSpan() {
		this.logId = String.valueOf(UUID.randomUUID().getLeastSignificantBits()).replace("-", "");
//        props.put(ClientConstants.X_B3_SOURCE_TYPE, ClientConstants.X_B3_SOURCE_TYPE_JAVA_VALUE);
	}

    public String getXmlyId() {
        return xmlyId;
    }

    public void setXmlyId(String xmlyId) {
        this.xmlyId = xmlyId;
    }

    public String getLevel() {
		return level;
	}
	public void setLevel(String level) {
		this.level = level;
	}
	public String getProcessId() {
		return processId;
	}
	public void setProcessId(String processId) {
		this.processId = processId;
	}
	public String getThreadId() {
		return threadId;
	}
	public void setThreadId(String threadId) {
		this.threadId = threadId;
	}
	public String getLogIdentity() {
		return logIdentity;
	}
	public void setLogIdentity(String logIdentity) {
		this.logIdentity = logIdentity;
	}

    public String getLogDetail() {
        return logDetail;
    }

    public void setLogDetail(String logDetail) {
        this.logDetail = logDetail;
    }

    public String getApp() {
		return app;
	}
	public void setApp(String app) {
		this.app = app;
	}

	public String getHostName() {
		return hostName;
	}
	public void setHostName(String hostName) {
		this.hostName = hostName;
	}
	public String getInstance() {
		return instance;
	}
	public void setInstance(String instance) {
		this.instance = instance;
	}
	public String getTraceId() {
		return traceId;
	}
	public void setTraceId(String traceId) {
		this.traceId = traceId;
	}
	public String getSpanId() {
		return spanId;
	}
	public void setSpanId(String spanId) {
		this.spanId = spanId;
	}
	public Long getTimestamp() {
		return timestamp;
	}
	public void setTimestamp(Long timestamp) {
		this.timestamp = timestamp;
	}
	public boolean isSample() {
		return isSample;
	}
	public void setSample(boolean isSample) {
		this.isSample = isSample;
	}
	public String getMethod() {
		return method;
	}
	public void setMethod(String method) {
		this.method = method;
	}
	public String getLogId() {
		return logId;
	}
	public void setLogId(String logId) {
		this.logId = logId;
	}
	public String getEventType() {
		return eventType;
	}
	public void setEventType(String eventType) {
		this.eventType = eventType;
	}

    public String getServiceId() {
        return serviceId;
    }

    public void setServiceId(String serviceId) {
        this.serviceId = serviceId;
    }
    

    public String getFile() {
		return file;
	}

	public void setFile(String file) {
		this.file = file;
	}

	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	
	public String getMonitorId() {
	
		return monitorId;
	}
	
	public void setMonitorId(String monitorId) {
	
		this.monitorId = monitorId;
	}
	
	public String getMonitorPId() {
	
		return monitorPId;
	}
	
	
	
	public Map<String, String> getProps() {
		if (props ==null) {
			props = new HashMap<String, String>();
		}
		return props;
	}

	public void setProps(Map<String, String> props) {
		this.props = props;
	}
	

	/**
	 * @param monitorPId the monitorPId to set
	 */
	public void setMonitorPId(String monitorPId) {
	
		this.monitorPId = monitorPId;
	}
	
	/**
	 * @return the c_sid
	 */
	public String getC_sid() {
	
		return c_sid;
	}

	
	/**
	 * @param c_sid the c_sid to set
	 */
	public void setC_sid(String c_sid) {
	
		this.c_sid = c_sid;
	}

	
	/**
	 * @return the c_ip
	 */
	public String getC_ip() {
	
		return c_ip;
	}

	
	/**
	 * @param c_ip the c_ip to set
	 */
	public void setC_ip(String c_ip) {
	
		this.c_ip = c_ip;
	}

	/**
	 * @return the c_app
	 */
	public String getC_app() {
	
		return c_app;
	}

	
	/**
	 * @param c_app the c_app to set
	 */
	public void setC_app(String c_app) {
	
		this.c_app = c_app;
	}
	
	
	/**
	 * @return the logger
	 */
	public String getLogger() {
	
		return logger;
	}

	
	/**
	 * @param logger the logger to set
	 */
	public void setLogger(String logger) {
	
		this.logger = logger;
	}

	@Override
    public String toString() {
        return "LogSpan{" +
                "app='" + app + '\'' +
                "ip='" + ip + '\'' +
                ", hostName='" + hostName + '\'' +
                ", instance='" + instance + '\'' +
                ", level='" + level + '\'' +
                ", processId='" + processId + '\'' +
                ", threadId='" + threadId + '\'' +
                ", logIdentity='" + logIdentity + '\'' +
                ", method='" + method + '\'' +
                ", logDetail='" + logDetail + '\'' +
                ", eventType='" + eventType + '\'' +
                ", serviceId='" + serviceId + '\'' +
                ", traceId='" + traceId + '\'' +
                ", spanId='" + spanId + '\'' +
                ", timestamp=" + timestamp +
                ", isSample=" + isSample +
                ", logId='" + logId + '\'' +
                ", file='" + file + '\'' +
                ", c_ip='" + c_ip + '\'' +
                ", c_app='" + c_app + '\'' +
                ", c_sid='"+ c_sid + '\'' +
                ", logger='"+ logger + '\'' +
                '}';
    }
}
